package edu.upc.cineplanet.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;



import edu.upc.cineplanet.Domain.UsuarioAdmin;
import edu.upc.cineplanet.service.UsuarioAdminService;

@Controller
public class AccesoUsuarioController {
	
	@Autowired
	UsuarioAdminService  service;	
	
	@RequestMapping(value="/listaUsuarios", method=RequestMethod.GET)
    public String index(Model model){ 
		
        	List<UsuarioAdmin> admins = service.obtenerUsuariosAdmin(); 		
    		model.addAttribute("data", admins);
        	return "vistaUsuariosAdmin";                	                
    }	
	
	
}
